﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;


namespace Jsptpd.Common
{
    public class LogHelper
    {
        /// <summary>
        /// 写日志
        /// </summary>
        /// <param name="log">日志内容</param>
        public static void WriteLog(string log)
        {
            string Time_Log = System.DateTime.Now.ToString() + "    " + log;
            using (FileStream fileStream = new FileStream(Application.StartupPath + @"\mailLog.txt", FileMode.Append, FileAccess.Write))
            {
                using (StreamWriter fs = new StreamWriter(fileStream))
                {
                    fs.WriteLine(Time_Log);
                    fs.Close();
                }
                fileStream.Close();
            }
        }
    }
}
